<?php
del_multi_favourite_property();
$rs_property = getAllFavouriteProperty();

?>
<script type="text/javascript" src="<?php echo SITE_JS_URL; ?>/inc_member.js"></script>
<script type="text/javascript" src="<?php echo SITE_JS_URL; ?>/inc_manage-property.js"></script>
<div class="container">
    <div class="content_mb">
        <?php include_once 'inc/left.php';?>
        <div class="content_mb_r">
            <?php include_once 'inc/post_property_top_center.php';?>
            <div style="margin-left: 20px;">
                <div class="title_mb_r31">
                    <div class="title_mb_r3_l">[Quản lý các tin rao yêu thích]</div>
                </div>

         

                <div class="bg_title_inbox">
                    <div class="bg_title_inbox_l">
                        <a href="javascript:void(0);" onclick="check_all();">[Chọn tất cả]</a>  |  <a href="javascript:void(0);" onclick="un_check_all();">[Bỏ chọn]</a>  |  <a href="javascript:void(0);" onclick="submit_form();">[Xóa]</a>
                    </div>
                    <?php
                    if($rs_property['total']>1) {
                        ?>
                    <div class="bg_title_inbox_r">
                        <ul>
                            <li>
                                <?php echo paging_small_member($rs_property['page'],$rs_property['total'],get_string_url_no_page());?>
                            </li>
                            <li>Trang <?php echo $rs_property['page'];?>/<?php echo $rs_property['total'];?></li>
                        </ul>
                    </div>
                    <?php
                }
                ?>
                </div>
                <form name="del_check" action="" method="post" id="form_del_check">
                    <div class="title_quanly">
                        <ul>
                            <li>
                                <div class="colum1"><input type="checkbox" class="checkAll" name="checkall" id="checkall" /></div>
                                <div class="colum2">[Tiêu đề] </div>
                                <div class="colum3">[Thông tin liên hệ]</div>

                            </li>
                        </ul>
                    </div>
                    <div class="list_quanly">
                        <ul>
                            <?php

                            while($rs=$db->fetch_array($rs_property['property'])) {
                                $arr_contact=get_property_contact($rs["id"]);

                                ?>
                            <li>
                                <div class="colum1"><input type="checkbox" name="check[]" id="check" class="check" value="<?php echo $rs['id'];?>" style="border:none;" /></div>
                                <div class="colum2">
                                    <ul>
                                        <li >
                                            <img src="<?php echo get_property_thumb($rs['thumb'],'91-71');?>" width="91px" height="71px" class="thumb_ql" />
                                            <a href="<?php echo get_link("property","detail",$rs['title_link']); ?>" target="_blank" title="<?=htmlentities_utf8($rs['title_link'])?>"><?php echo limitWord($rs['title'],100);?></a><br /><br />
                                            <?php
                                            $arrGeo = getGeoNameByGeoId($rs['geo_id']);
                                            ?>
                                            <b>[Vị trí]:</b> <?php echo $arrGeo['city'];?> l <?php echo $arrGeo['district'];?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                            <b>[Giá] :</b> <?php echo get_price_string($rs['price']);?> /m2<br />
                                            <b>[Diện tích]:</b> <?php echo showData($rs['area_build']);?> m2
                                        </li>
                                        <li class="bt_ql">
                                            [MS]: <?php if($rs['type']=='rent') echo 'R'.$rs['id']; else echo 'S'.$rs['id'];  ?>
                                            |  [Xem]: <?php echo $rs['view_count']?> [lượt]
                                        </li>
                                    </ul>
                                </div>
                                <div class="colum3" style="padding-top:10px">

                                    [Người đăng]: <b><?php echo showData($arr_contact["name"]);?></b><br/>
                                    [Email]: <b><?php echo showData($arr_contact["email"]);?></b><br/>
                                    [Điện thoại]: <b><?php echo showData($arr_contact["phone"]);?></b><br/>
                                    [Di động]: <b><?php echo showData($arr_contact["mobile"]);?></b>

                                </div>

                            </li>
                            <?php
                        }
                        ?>
                        </ul>
                    </div>
                </form>
                <div class="bg_title_inbox">
                    <div class="bg_title_inbox_l">
                        <a href="javascript:void(0);" onclick="check_all();">[Chọn tất cả]</a>  |  <a href="javascript:void(0);" onclick="un_check_all();">[Bỏ chọn]</a>  |  <a href="javascript:void(0);" onclick="submit_form();">[Xóa]</a>
                    </div>
                    <div class="bg_title_inbox_r2">
                        <div class="pagination2">
                            <?php
                            if(intval($rs_property["total"])>1 && !empty($params[1])) {
                                echo paging_member($rs_property["page"],$rs_property["total"],get_string_url_no_page());
                            }
                            ?>
                        </div>
                    </div>
                </div>

            </div>
        </div>
    </div>

</div>